package com.atguigu.spzx.order.mapper;

import com.atguigu.spzx.model.entity.order.OrderInfo;
import com.atguigu.spzx.model.entity.order.OrderItem;
import com.atguigu.spzx.model.entity.order.OrderLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {
    void addOrder(OrderInfo orderInfo);

    void addOrderLog(OrderLog orderLog);

    void addOrderItem(OrderItem orderItem);


    OrderInfo getOrderInfo(Long orderId);

    List<OrderItem> getOrderItemListById(Long orderId);

    List<OrderInfo> findList(@Param("orderStatus") Integer orderStatus, @Param("id") Long id);

    OrderInfo getByOrderNo(String orderNo);

    void afterPaySuccess(@Param("orderNo")String orderNo, @Param("payType")Integer payType);

    void cancelOrder(@Param("orderNo") String orderNo,@Param("reason") String reason);
}
